<template>
	<view class="person_data">
		<view class="header">
			<view class="header-name"></view>
			<view class="header-score">做题数量</view>
			<view class="header-rank">正确率</view>
			<view class="header-analysis">答题速度</view>
		</view>
		<view class="body" v-for="(item,index) in dataList" :key='index'>
			<view class="header-name knowledge-name">{{item.knowledge}}</view>
			<view class="header-score">{{item.subjectNum}}道</view>
			<view class="header-rank">{{item.accuracy}}</view>
			<view class="header-analysis">{{item.speed}}s/题</view>
		</view>
	</view>
</template>

<script>
	import ExamRankItem from './ExamRankItem';
	export default {
		components: {
			ExamRankItem
		},
		props: {
			dataList: {
				type: Array,
				default: function() {
					return []
				}
			}
		},
		data() {
			return {}
		},
		watch: {},
		methods: {}
	}
</script>

<style lang="scss" scoped>
	.header {
		font-size: 24upx;
		color: #ffffff;
		height: 60upx;
		line-height: 60upx;
		background-color: #5ea1f8;
		border-radius: 8upx;

		&-name {
			display: inline-block;
			width: 30%;
			// overflow: hidden;
			// white-space: nowrap;
			// text-overflow: ellipsis;
			padding-left: 20upx;
		}

		&-score {
			text-align: center;
			display: inline-block;
			width: 20%;
		}

		&-rank {
			text-align: center;
			display: inline-block;
			width: 20%;
		}

		&-analysis {
			text-align: right;
			display: inline-block;
			width: 30%;
			padding-right: 20upx;
		}
	}

	.body {
		display:flex;
		align-items:center;
		font-size: 28upx;
		color: #5ea1f8;
		padding: 24upx 0;
		border-bottom: 2upx dashed  #d7e5ff;
	}

	.knowledge-name {
		color: #333333;
	}
</style>
